<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改押金记录')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-deposit-edit" th:object="${deposit}">
            <input name="depositId" th:field="*{depositId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">押金状态：</label>
                <div class="col-sm-8">
                    <select name="depositStatus" class="form-control m-b" th:with="type=${@dict.getType('deposit_status')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{depositStatus}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">押金费用：</label>
                <div class="col-sm-8">
                    <input name="depositCost" th:field="*{depositCost}" class="form-control" type="text" required readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">房间号：</label>
                <div class="col-sm-8">
                    <input name="roomNumber" th:field="*{roomNumber}" class="form-control" type="text" required readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">手机号码：</label>
                <div class="col-sm-8">
                    <input name="phone" th:field="*{phone}" class="form-control" type="text" required readonly>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">支付方式：</label>
                <div class="col-sm-8">
                    <select name="payType" class="form-control m-b" th:with="type=${@dict.getType('pay_type')}" required readonly>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{payType}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "order/deposit";
        $("#form-deposit-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-deposit-edit').serialize());
            }
        }
    </script>
</body>
</html>